package com.our.project1.entity;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.springside.modules.orm.grid.ViewField;

import com.our.sys.orm.hibernate.AuditableEntity;

/**
 * 部门类别
 * @author acer
 *
 */
@Entity
@Table(name = "T_KindClass")
public class KindClass extends AuditableEntity implements Serializable{

    /**
     * 
     */
    private static final long serialVersionUID = -583534497116693998L;
    @ViewField(header = "分类类别", width = 300, align = "left")
    private String kind;
    @ViewField(header = "分类码", width = 300, align = "left")
    private String code;
    @ViewField(header = "分类值", width = 300, align = "left")
    private String name;
    @ViewField(header = "拼音助记符", width = 300, align = "left")
    private String py;
    @ViewField(header = "五笔助记符", width = 300, align = "left")
    private String wb;
    @ViewField()
    private Long type;//用来区分各种分类

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }

    @Id
    @GeneratedValue(strategy = GenerationType.TABLE, generator = "Id_Generator")
    @TableGenerator(name = "Id_Generator", table = "ID_GENERATOR", pkColumnName = "GEN_NAME", valueColumnName = "GEN_VAL", pkColumnValue = "T_KindClass")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }

    public String getPy() {
        return py;
    }

    public void setPy(String py) {
        this.py = py;
    }

    public String getWb() {
        return wb;
    }

    public void setWb(String wb) {
        this.wb = wb;
    }

    public Long getType() {
        return type;
    }

    public void setType(Long type) {
        this.type = type;
    }

}
